home *** CD-ROM | disk | FTP | other *** search
/ Clickx 35 / Clickx 35.iso / assets / software / EC Architect / Acrobat / Data1.cab / PictureTasks.NLD / SCRIPT / SLIDESHOW_END < prev    next >
Encoding:
Text File  |  2003-11-03  |  39.4 KB  |  969 lines

  1. <!-- 
  2.  Copyright 2002-2003, Adobe Systems Incorporated 
  3.  All Rights Reserved.
  4.  
  5.  NOTICE: All information contained herein is, and remains the property 
  6.  of Adobe Systems Incorporated and its suppliers, if any.  The 
  7.  intellectual and technical concepts contained herein are proprietary 
  8.  to Adobe Systems Incorporated and its suppliers and may be covered by 
  9.  U.S. and Foreign Patents, patents in process, and are protected by
  10.  trade secret or copyright law.  Dissemination of this information or 
  11.  reproduction of this material is strictly forbidden unless prior
  12.  written permission is obtained from Adobe Systems Incorporated.
  13. --><svg onload="on_load()" overflow="visible" id="VCRRoot" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/4.0/" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" zoomAndPan="magnify">
  14.     <metadata>
  15.         <vcrControl vcrControlID="comp.adobe.jupiter.vcrcontrol.slideshow">
  16.             <!-- name of the vcrcontrol - internationalize with switch/systemLanguage -->
  17.             <vcrControlName>SlideshowVCRControl</vcrControlName>
  18.             <thumbnail xlink:href="vcrcontrol.jpg"/>
  19.         </vcrControl>
  20.     </metadata>
  21.  
  22.     <cursor id="NoCursor" x="8" y="8" width="16" height="16">
  23.     </cursor>
  24.  
  25.     <rect id="EventCatcher" fill="none" stroke="none" x="-3000" y="-3000" width="10000" height="10000" pointer-events="all"/>
  26.  
  27.     <script id="BootStrap"><![CDATA[
  28.  
  29.         var isMac = false;
  30.         var    ControlBar;
  31.         var    ControlBg;
  32.         var    EventCatcher;
  33.         var    bMouseDown = false;
  34.         var    bPaused = false;
  35.         var    bMoveSlider = false;
  36.         var    lastX;
  37.         var    lastY;
  38.         var    ButtonQuit;
  39.         var    ButtonClose;
  40.         var    ButtonFirst;
  41.         var    ButtonPrev;
  42.         var    ButtonNext;
  43.         var    ButtonLast;
  44.         var    ButtonPause;
  45.         var    ButtonPlay;
  46.         var    ProgressBar;
  47.         var    PauseSymbol;
  48.         var PlaySymbol;
  49.         var    curPage = 0;
  50.         var progressBarScale;
  51.         // var TransElement;
  52.         // var initialTransType
  53.         var FactoryControl;
  54.         var FactoryCommand;
  55.         var bButtonPressed
  56.         var timeoutID;
  57.         var HideTimeout;
  58.         var VCRRoot;
  59.         var VCRControlsJustDisappeared = false;
  60.         var bMuted = false;
  61.         var typeString = "";
  62.         var factoryMode = false;
  63.         var xmlnsAdobe  = "http://ns.adobe.com/AdobeSVGViewerExtensions/4.0/";
  64.         var skipPositioning = false;
  65.  
  66.         //-----------------------------------------------------------------------------
  67.         function setupButtonAnim(button,index)
  68.         {
  69.             var bs = VCRBeginString;
  70.             if( bs.length > 0 )
  71.                 bs += "+";
  72.             var anim = document.createElement( "animate" );
  73.             anim.setAttribute( "attributeName", "opacity" );
  74.             anim.setAttribute( "values", "0.5" );
  75.             anim.setAttribute( "fill", "remove" );
  76.             anim.setAttribute( "begin" ,bs+pageTimes[index]+"s" );
  77.             anim.setAttribute( "end" ,bs+(pageTimes.length>index+1?pageTimes[index+1]:totalDuration)+"s" );
  78.             button.appendChild( anim );
  79.         }
  80.         //-----------------------------------------------------------------------------
  81.         function on_load()
  82.         {
  83.             if( typeof navigator != 'undefined' )
  84.                 isMac = (navigator.platform == "MacOS");
  85.  
  86.             if( typeof totalDuration == 'undefined' )
  87.             {
  88.                 // help with testing
  89.                 totalDuration = 20;
  90.                 pageTimes = [ 0, 5, 10, 15 ];
  91.                 pageTransitions = [];
  92.                 pageElems = [];
  93.                 VCRBeginString = "";
  94.                 VCRControlVisible = true;
  95.                 transitionDuration = 1;
  96.                 AutoRepeat = true;
  97.                 startDocumentPaused = false;
  98.                 startBGAudio        = false;
  99.                 docStartTime = 0;
  100.             }
  101.  
  102.             // use totalDuration supplied by the compositionengine
  103.             document.getElementById('ProgressBarAnimation').setAttributeNS(null,"dur",totalDuration);
  104.  
  105.             // use beginString supplied by the composition engine
  106.             document.getElementById('ProgressBarAnimation').setAttributeNS(null,"begin",VCRBeginString);
  107.  
  108.             document.rootElement.addEventListener( "mousedown", OnMouseDown, false )
  109.             document.rootElement.addEventListener( "mouseup", OnMouseUp, false )
  110.             document.rootElement.addEventListener( "mousemove", OnMouseMove, false )
  111.             document.rootElement.addEventListener( "keydown", OnKeyDown, false )
  112.             document.rootElement.addEventListener( "SVGZoom", PositionControls, false )
  113.             document.rootElement.addEventListener( "SVGResize", PositionControls, false )
  114.             document.rootElement.addEventListener( "SVGScroll", PositionControls, false )
  115.  
  116.             // create the background canvas
  117.  
  118.             ControlBar = document.getElementById('ControlBar');
  119.             ControlBg = document.getElementById('Control_Bg');
  120.  
  121.             if( VCRControlVisible )
  122.                 ControlBar.setAttribute( "display", "inline" );
  123.             else
  124.                 ControlBar.setAttribute( "display", "none" );
  125.  
  126.             PositionControls()
  127.  
  128.             // TransElement = document.getElementById( "trans0" );
  129.             // if( TransElement != null )
  130.             //     initialTransType = TransElement.getAttribute( "type" );
  131.  
  132.             ButtonFirst = document.getElementById('Button_First');
  133.             ButtonPrev  = document.getElementById('Button_Prev');
  134.             ButtonPause = document.getElementById('Button_Pause');
  135.             ButtonPlay  = document.getElementById('Button_Play');
  136.             ButtonNext  = document.getElementById('Button_Next');
  137.             ButtonLast  = document.getElementById('Button_Last');
  138.             ButtonQuit  = document.getElementById('Button_Quit');
  139.             ButtonClose = document.getElementById('Button_Close');
  140.             ProgressBar = document.getElementById('Progress_Bar');
  141.             ProgressGroup = document.getElementById('Progress_Group');
  142.             FactoryControl   = document.getElementById('FactoryControl');
  143.             FactoryCommand   = document.getElementById('FactoryCommand');
  144.             EventCatcher = document.getElementById('EventCatcher');
  145.             VCRRoot = document.getElementById('VCRRoot');
  146.  
  147.             // set up dasharray for progress bar from slide timings
  148.             progressBarScale = 10.0/totalDuration;
  149.             var dasharr = "0 " + progressBarScale*transitionDuration;
  150.             for( var i = 1 ; i <= pageTimes.length ; i++ )
  151.             {
  152.                 var time;
  153.                 if( i == pageTimes.length )
  154.                     time = totalDuration;
  155.                 else
  156.                     time = pageTimes[i];
  157.                 var dur = time - pageTimes[i-1]
  158.                 dasharr += " " + progressBarScale*(dur - transitionDuration) + 
  159.                     " " + progressBarScale*transitionDuration
  160.             }
  161.             var pbtm = ProgressBar.getTransformToElement(ProgressBar.parentNode);
  162.             var shift = document.rootElement.createSVGMatrix();
  163.             shift.e = -progressBarScale*transitionDuration*0.5;
  164.             pbtm = pbtm.multiply(shift);
  165.             ProgressBar.setAttribute( "transform", m2str(pbtm) );
  166.             ProgressBar.setAttribute( "stroke-dasharray", dasharr );
  167.  
  168.             setupButtonAnim( ButtonFirst, 0 );
  169.             if( !AutoRepeat )
  170.                 setupButtonAnim( ButtonPrev, 0 );
  171.             setupButtonAnim( ButtonLast, pageTimes.length-1 );
  172.             if( !AutoRepeat )
  173.                 setupButtonAnim( ButtonNext, pageTimes.length-1 );
  174.  
  175.             if( !isMac )
  176.                 EventCatcher.setAttribute( "cursor", "url(#NoCursor)" );
  177.  
  178.             rootMatrix  = document.rootElement.getScreenCTM();
  179.             rootMatrixInverse = rootMatrix.inverse();
  180.  
  181.                if (startDocumentPaused)
  182.                {
  183.                TogglePaused();
  184.                timeoutID = setTimeout( "GoToPage(0)", 10 )
  185.                }
  186.             // whenever pause is toggled update the controls
  187.             var pause = contextMenu.getElementById('Pause');
  188.             if( pause != null )
  189.                 pause.setAttribute('onactivate', "TogglePaused()");
  190.         }
  191.  
  192.         function BeginBGAudio()
  193.         {
  194.            if (startBGAudio)
  195.            {
  196.             startBGAudio = false;
  197.                var bgAudio = document.getElementById('page0audio');
  198.                if (bgAudio != null)
  199.                bgAudio.beginElement();
  200.            }
  201.         }
  202.  
  203.         function PositionControls()
  204.         {
  205.             if( skipPositioning )
  206.                 return;
  207.             ControlBar.setAttribute( "transform",  "translate(0 0)" );
  208.             var ctm = ControlBar.getScreenCTM();
  209.             ctm.e -= getInnerWidth() - 230;
  210.             //ctm.f -= getInnerHeight() - 100; // lower right corner
  211.             ctm.f += 20; // upper right corner
  212.             var ictm = ctm.inverse();
  213.             var scale = 0.82;
  214.             ictm.a *= scale;
  215.             ictm.b *= scale;
  216.             ictm.c *= scale;
  217.             ictm.d *= scale;
  218.             ControlBar.setAttribute( "transform",  m2str(ictm) );
  219.         }
  220.  
  221.         //-----------------------------------------------------------------------------
  222.         function OnClickButtonFirst(evt)
  223.         {
  224.             GoToPage(0);
  225.         }
  226.         //-----------------------------------------------------------------------------
  227.         function DoPrev()
  228.         {
  229.             curTime = document.rootElement.getCurrentTime();
  230.             curPage = GetCurPage();
  231.  
  232.             if (curPage > 0)
  233.                 curPage--;
  234.             else if( AutoRepeat )
  235.                 curPage = pageTimes.length - 1;
  236.  
  237.             GoToPage(curPage);
  238.             if( bButtonPressed )
  239.                 timeoutID = setTimeout( "DoPrev()", 500 )
  240.         }
  241.         //-----------------------------------------------------------------------------
  242.         function OnClickButtonPause(evt)
  243.         {
  244.             TogglePaused()
  245.         }
  246.         function TogglePaused()
  247.         {
  248.             var cmd;
  249.             if (bPaused)
  250.             {
  251.                 cmd="document.rootElement.unpauseAnimations();setupTransitions()";
  252.                 ButtonPlay.setAttribute('display', 'none');
  253.                 ButtonPause.setAttribute('display', 'inline');
  254.             }
  255.             else
  256.             {
  257.                 cmd="document.rootElement.pauseAnimations();setupTransitions(); BeginBGAudio()";
  258.                 ButtonPause.setAttribute('display', 'none');
  259.                 ButtonPlay.setAttribute('display', 'inline');
  260.             }
  261.             bPaused = !bPaused;
  262.             setTimeout(cmd, 10);
  263.         }
  264.         //-----------------------------------------------------------------------------
  265.         function setupTransitions()
  266.         {
  267.             // toggle the transition values on the animators
  268.             if (bPaused)
  269.             {
  270.                 var elem;
  271.                 for( var i = 0 ; i < pageElems.length ; i++ )
  272.                 {
  273.                     elem = document.getElementById(pageElems[i]);
  274.                     if (elem.hasAttributeNS(xmlnsAdobe,"transIn"))
  275.                         elem.removeAttributeNS(xmlnsAdobe,"transIn");
  276.                 }
  277.  
  278.                 // force currently running transitions to abort
  279.                 try
  280.                 {
  281.                     skipPositioning = true;
  282.                     document.rootElement.currentTranslate.x = 1
  283.                     document.rootElement.currentTranslate.x = 0
  284.                 }
  285.                 catch( err )
  286.                 {
  287.                 }
  288.                 skipPositioning = false;
  289.             }
  290.             else
  291.             {
  292.                 for( var i = 0 ; i < pageElems.length ; i++ )
  293.                 {
  294.                     document.getElementById(pageElems[i]).setAttributeNS(xmlnsAdobe,"a:transIn",pageTransitions[i]);
  295.                 }
  296.             }
  297.         }
  298.         //-----------------------------------------------------------------------------
  299.         function DoNext()
  300.         {
  301.             curPage = GetCurPage();
  302.     
  303.             if (curPage < pageTimes.length - 1)
  304.                 curPage++;
  305.             else if( AutoRepeat )
  306.                 curPage = 0;
  307.  
  308.             GoToPage( curPage );
  309.             if( bButtonPressed )
  310.                 timeoutID = setTimeout( "DoNext()", 500 )
  311.         }
  312.         //-----------------------------------------------------------------------------
  313.         function OnClickButtonLast(evt)
  314.         {
  315.             GoToPage(pageTimes.length-1);
  316.         }
  317.         //-----------------------------------------------------------------------------
  318.         function OnClickButtonQuit(evt)
  319.         {
  320.             close();
  321.         }
  322.         //-----------------------------------------------------------------------------
  323.         function ToggleMute()
  324.         {
  325.             bMuted = !bMuted;
  326.             var volume;
  327.             if( bMuted )
  328.                 volume = "1.0";
  329.             else
  330.                 volume = "0.0";
  331.             var list = document.getElementsByTagName('a:audio');
  332.             var count = list.length;
  333.             var i;
  334.             for(i = 0; i < count; i++)
  335.             {
  336.                 var a = list.item(i);
  337.                 a.setAttribute( "volume", volume );
  338.             }
  339.             list = document.getElementsByTagName('a:video');
  340.             count = list.length;
  341.             for(i = 0; i < count; i++)
  342.             {
  343.                 var a = list.item(i);
  344.                 a.setAttribute( "volume", volume );
  345.             }
  346.         }
  347.         //-----------------------------------------------------------------------------
  348.         function ToggleVCRVisibility()
  349.         {
  350.             VCRControlVisible = !VCRControlVisible;
  351.             if( VCRControlVisible )
  352.                 ControlBar.setAttribute( "display", "inline" );
  353.             else
  354.                 ControlBar.setAttribute( "display", "none" );
  355.         }
  356.         //-----------------------------------------------------------------------------
  357.         function GetCurPageFromTime(curTime)
  358.         {
  359.             var repeatCount = Math.floor((curTime-docStartTime)/totalDuration);
  360.             curTime = curTime - totalDuration*repeatCount;
  361.             curPage = 1;
  362.  
  363.             while ( curPage < pageTimes.length && curTime >= pageTimes[curPage]/1.0 )
  364.             {
  365.                 curPage++;
  366.             }
  367.                     
  368.             return curPage-1;
  369.         }
  370.         function GetCurPage()
  371.         {
  372.             curTime = document.rootElement.getCurrentTime();
  373.             return GetCurPageFromTime(curTime);
  374.         }
  375.         //-----------------------------------------------------------------------------
  376.         function GoToPage( curPage )
  377.         {
  378.             if (curPage < 0)
  379.                 curPage = 0;
  380.             else if (curPage >= pageTimes.length)
  381.                 curPage = pageTimes.length - 1; 
  382.  
  383.             setVidLink(curPage);
  384.             GoToTime( pageTimes[curPage] );
  385.         }
  386.  
  387.         //-----------------------------------------------------------------------------
  388.         function GoToTime( newTime)
  389.         {
  390.             var reqTime = newTime;
  391.             var curTime = document.rootElement.getCurrentTime();
  392.             var repeatCount = Math.floor((curTime-docStartTime)/totalDuration);
  393.             if (repeatCount < 0 || !AutoRepeat)
  394.                 repeatCount = 0.0;
  395.             newTime = newTime + repeatCount * totalDuration + docStartTime;
  396.             // watch out for roundoff error in SVGCore
  397.             if (bPaused)
  398.                 newTime += .001;
  399.             // alert("reqTime = " + reqTime + "curTime = " + curTime + " newTime = " + newTime);
  400.             document.rootElement.setCurrentTime( newTime );
  401.         }
  402.         //-----------------------------------------------------------------------------
  403.         function GoToDocTime( newTime)
  404.         {
  405.             var newPage = GetCurPageFromTime(newTime);
  406.             setVidLink(newPage);
  407.             GoToTime(newTime);
  408.         }
  409.         //-----------------------------------------------------------------------------
  410.         function OnKeyPress(evt)
  411.         {
  412.             if( evt.charCode < 32 )
  413.             {
  414.                 if( evt.charCode == 13 ) // enter
  415.                 {
  416.                     FactoryCommand.setAttribute("fill","green")
  417.                     var txt = FactoryCommand.firstChild;
  418.                     txt.data = "Result: " + eval( txt.data );
  419.                 }
  420.                 return;
  421.             }
  422.             var txt = FactoryCommand.firstChild
  423.             if( FactoryCommand.getAttribute("fill") != "black" )
  424.             {
  425.                 txt.data = "";
  426.                 FactoryCommand.setAttribute( "fill", "black" );
  427.             }
  428.             txt.data += String.fromCharCode(evt.charCode)
  429.         }
  430.  
  431.         //-----------------------------------------------------------------------------
  432.         function OnKeyDown(evt)
  433.         {
  434.             var code = evt.keyCode;
  435.             if( typeString.length > 0 && !factoryMode )
  436.             {
  437.                 var secretString = "JUPITER";
  438.                 typeString += String.fromCharCode(code);
  439.                 if( typeString.length >= secretString.length )
  440.                 {
  441.                     if( typeString == secretString )
  442.                     {
  443.                         factoryMode = true
  444.                         FactoryControl.setAttribute( "display", "inline" );
  445.                         setTimeout( 'document.rootElement.addEventListener( "keypress", OnKeyPress, false )', 2 );
  446.                     }
  447.                     else
  448.                         typeString = "";
  449.                 }
  450.             }
  451.             if( code == 37 || code == 38 || code == 33 ) // left, up, PgUp
  452.                 DoPrev();
  453.             else if( code == 39 || code == 40 || code == 34 ) // right, down, PgDn
  454.                 DoNext();
  455.             else if( code == 36 ) // home
  456.                 OnClickButtonFirst();
  457.             else if( code == 35 ) // end
  458.                 OnClickButtonLast();
  459.             else if( code == 8 && !factoryMode) // backspace
  460.                 DoPrev();
  461.             else if( code == 32 )
  462.                 OnClickButtonPause();
  463.             else if( code == 77 ) // 'M'
  464.                 ToggleMute();
  465.             else if( code == 86 ) // 'V'
  466.                 ToggleVCRVisibility();
  467.             else if( code == 65 && typeString.length == 0 )
  468.                 typeString = "A";
  469.             else if( factoryMode && FactoryCommand.getAttribute("fill") == "black" )
  470.             {
  471.                 if( code == 8 || code == 127 ) // BS and DEL
  472.                 {
  473.                     var txt = FactoryCommand.firstChild;
  474.                     if( txt.data.length >= 1 )
  475.                         txt.deleteData( txt.data.length-1, 1 );
  476.                 }
  477.             }
  478.         }
  479.  
  480.         //-----------------------------------------------------------------------------
  481.         function OnMouseDown(evt)
  482.         {
  483.             var obj = evt.target
  484.  
  485.             if( obj.nodeName == null ) // SVGElementInstance
  486.                 return;
  487.  
  488.             if( obj.getNodeName() != 'path' || obj.parentNode.getNodeName() != 'g' )
  489.                 return;
  490.  
  491.             obj = obj.parentNode;
  492.  
  493.             // see if they pushed one of the buttons...
  494.             if (obj == ButtonQuit)
  495.             {
  496.                 OnClickButtonQuit(evt);
  497.                 return;
  498.             }
  499.             else if (obj == ButtonFirst)
  500.             {
  501.                 bButtonPressed = true
  502.                 ButtonFirst.setAttribute( "filter", "url(#PushedButton)" );
  503.                 OnClickButtonFirst(evt);
  504.                 return;
  505.             }
  506.             else if (obj == ButtonPrev)
  507.             {
  508.                 CatchAllEvents(true,"default");
  509.                 bButtonPressed = true
  510.                 ButtonPrev.setAttribute( "filter", "url(#PushedButton)" );
  511.                 DoPrev();
  512.                 return;
  513.             }
  514.             else if (obj == ButtonPause || obj == ButtonPlay)
  515.             {
  516.                 OnClickButtonPause(evt);
  517.                 return;
  518.             }
  519.             else if( obj == ButtonClose )
  520.             {
  521.                 VCRControlsJustDisappeared = true;
  522.                 setTimeout( "VCRControlsJustDisappeared=false", 1000 );
  523.                 ControlBar.setAttribute( "display", "none" );
  524.                 VCRControlVisible = false;
  525.                 return;
  526.             }
  527.             else if (obj == ButtonNext)
  528.             {
  529.                 CatchAllEvents(true,"default")
  530.                 bButtonPressed = true
  531.                 ButtonNext.setAttribute( "filter", "url(#PushedButton)" );
  532.                 DoNext();
  533.                 return;
  534.             }
  535.             else if (obj == ButtonLast)
  536.             {
  537.                 bButtonPressed = true
  538.                 ButtonLast.setAttribute( "filter", "url(#PushedButton)" );
  539.                 OnClickButtonLast(evt);
  540.                 return;
  541.             }
  542.  
  543.             if (obj == ControlBar || obj == ProgressGroup )
  544.             {
  545.                 lastX = evt.clientX;
  546.                 lastY = evt.clientY;
  547.  
  548.                 bMouseDown  = obj != ProgressGroup;
  549.                 bMoveSlider = !bMouseDown;
  550.                 document.rootElement.pauseAnimations();
  551.                 if( bMoveSlider )
  552.                 {
  553.                     lastX = -100; // force rewind
  554.                     OnMouseMove(evt);
  555.                     CatchAllEvents( true, "url(#MoveLeftRight)" );
  556.                 }
  557.                 else
  558.                 {
  559.                     CatchAllEvents( true, "move" );                    
  560.                 }
  561.             }
  562.         }
  563.         //-----------------------------------------------------------------------------
  564.         function CatchAllEvents(catchAll,cursor)
  565.         {
  566.             VCRRoot.removeChild( EventCatcher );
  567.             if( cursor != null && !isMac )
  568.                 EventCatcher.setAttribute( "cursor", cursor );
  569.             if( catchAll )
  570.                 VCRRoot.appendChild( EventCatcher );
  571.             else
  572.                 VCRRoot.insertBefore( EventCatcher, VCRRoot.firstChild );
  573.         }
  574.         //-----------------------------------------------------------------------------
  575.         function HideControls()
  576.         {
  577.             if( bMouseDown || bMoveSlider || bButtonPressed )
  578.             {
  579.                 HideTimeout = setTimeout( 'HideTimeout=null;HideControls()', 3000 );
  580.             }
  581.             else
  582.             {
  583.                 if( !VCRControlVisible )
  584.                     ControlBar.setAttribute( "display", "none" );
  585.                 if( !isMac )
  586.                 {
  587.                     EventCatcher.setAttribute( "cursor", "url(#NoCursor)" );
  588.                     // force cursor update
  589.                     var d = document.createElement("dummy");
  590.                     document.rootElement.appendChild( d );
  591.                     document.rootElement.removeChild( d );
  592.                 }
  593.             }
  594.         }
  595.         //-----------------------------------------------------------------------------
  596.         function OnMouseMove(evt)
  597.         {
  598.             // ignore initial mousemove events that can be spurious
  599.             if( bPaused || document.rootElement.getCurrentTime() >= 0.2 )
  600.             {
  601.                 if( HideTimeout != null )
  602.                     clearTimeout( HideTimeout );
  603.                 var q = evt.target;
  604.                 while( q != null && q != ControlBar )
  605.                     q = q.parentNode;
  606.                 if( q == null )
  607.                 {
  608.                     if( ! VCRControlsJustDisappeared )
  609.                         ControlBar.setAttribute( "display", "inline" );
  610.                     HideTimeout = setTimeout( 'HideTimeout=null;HideControls()', 3000 );
  611.                     if( !bMouseDown && !bMoveSlider && !isMac )
  612.                         EventCatcher.setAttribute( "cursor", "auto" );
  613.                 }
  614.             }
  615.             if (bMouseDown || bMoveSlider)
  616.             {
  617.                 // convert from screen coords to SVG page coords
  618.                 var x = evt.clientX;
  619.                 var y = evt.clientY;
  620.  
  621.                 var p = document.rootElement.createSVGPoint();
  622.             
  623.                 // see if we have started dragging
  624.                 if ( Math.abs( lastX - x ) < 2 && (bMoveSlider || Math.abs( lastY - y ) < 2) ) 
  625.                 {
  626.                     //trace('Not dragging?');
  627.                     return;
  628.                 }
  629.  
  630.                 p.x = x - lastX;
  631.                 p.y = y - lastY;
  632.                 lastX = x;
  633.                 lastY = y;
  634.  
  635.                 if (bMouseDown)
  636.                 {
  637.                     var curMat = ControlBar.getScreenCTM();
  638.                     t = curMat.inverse();
  639.                     t.e = 0;
  640.                     t.f = 0;
  641.                     p = p.matrixTransform( t );
  642.  
  643.                     curMat = ControlBar.getTransformToElement(ControlBar.parentNode);
  644.                     curMat = curMat.translate( p.x, p.y );
  645.                     ControlBar.setAttribute( 'transform', m2str(curMat) );
  646.                 }
  647.                 else 
  648.                 {
  649.                     slMat = ProgressBar.getScreenCTM();
  650.                     s = slMat.inverse();
  651.                     p.x = x;
  652.                     p.y = y;
  653.                     p = p.matrixTransform( s );
  654.                     var time = p.x/progressBarScale;
  655.                     if( time > totalDuration - 1 )
  656.                         time = totalDuration - 1;
  657.                     GoToDocTime( time+docStartTime );
  658.                 }
  659.             }
  660.         }
  661.         //-----------------------------------------------------------------------------
  662.         function OnMouseUp(evt)
  663.         {
  664.             if( EventCatcher.previousSibling != null )
  665.                 CatchAllEvents( false, "auto" );
  666.  
  667.             if( (bMouseDown || bMoveSlider || bButtonPressed) && !bPaused) 
  668.                 document.rootElement.unpauseAnimations();
  669.  
  670.             if( bButtonPressed )
  671.             {
  672.                 ButtonFirst.setAttribute( "filter", "none" );
  673.                 ButtonLast.setAttribute( "filter", "none" );
  674.                 ButtonNext.setAttribute( "filter", "none" );
  675.                 ButtonPrev.setAttribute( "filter", "none" );
  676.                 bButtonPressed = false;
  677.                 if( timeoutID != null )
  678.                     clearTimeout( timeoutID );
  679.             }
  680.  
  681.             if(bMouseDown)
  682.             {
  683.                 bMouseDown = false;
  684.             }
  685.  
  686.             if (bMoveSlider)
  687.             {
  688.                 bMoveSlider = false;
  689.                 // if( TransElement != null )
  690.                 //     TransElement.setAttribute( "type", initialTransType )
  691.             }
  692.         }
  693.         //-----------------------------------------------------------------------------
  694.         function m2str(m)
  695.         {
  696.             return "matrix(" + m.a + " " + m.b + " " + m.c + " " + m.d + " " + m.e + " " + m.f + ")"
  697.         }
  698.  
  699.         //-----------------------------------------------------------------------------
  700.     ]]></script>
  701.  
  702.     <!-- animation needs to be set on this element -->
  703.     <animate id="ProgressBarAnimation" xlink:href="#Progress_Bar" attributeName="x2" dur="1s" values="0;10" restart="always" fill="freeze" accumulate="none" additive="replace" calcMode="linear"/>
  704.  
  705.     <cursor id="MoveLeftRight" shape-rendering="optimizeSpeed" x="8" y="8" width="16" height="16">
  706.         <path stroke="black" fill="white" d="M0.5 8.5l5-5v3h5v-3l5 5l-5 5v-3h-5v3z"/>
  707.     </cursor>
  708.  
  709.     <g display="none" id="FactoryControl">
  710.         <rect width="600" height="20" fill="white" stroke="red"/>
  711.         <text id="FactoryCommand" x="5" y="16" font-size="16" text-rendering="optimizeLegibility" fill="green" startOffset="0">Type your command</text>
  712.     </g>
  713.  
  714.     <g id="ControlBar" display="none">
  715.         <filter id="PushedButton">
  716.             <feComponentTransfer>
  717.                 <feFuncR type="linear" intercept="0.25" slope="1.3"/>
  718.                 <feFuncA type="linear" intercept="0" slope="2"/>
  719.             </feComponentTransfer>
  720.         </filter>
  721.         <image opacity="0.3" width="287" height="137" id="XMLID_1_" xlink:href="data:;base64, iVBORw0KGgoAAAANSUhEUgAAAR8AAACJCAYAAAAVHzynAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdH dhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAkNSURBVHjaYmYYBaNgFIyCAQAAAcQ8GgSjYBSMgoEAAAE0 WviMglEwCgYEAATQaOEzCkbBKBgQABBAo4XPKBgFo2BAAEAAjRY+o2AUjIIBAQABNFr4jIJRMAoGBAAE0G jhMwpGwSgYEAAQQKOFzygYBaNgQABAAI0WPqNgFIyCAQEAATRa+IyCUTAKBgQABNBo4TMKRsEoGBAAEECj hc8oGAWjYEAAQACNFj6jYBSMggEBAAE0WviMglEwCgYEAATQaOEzCkbBKBgQABBAo4XPKBgFo2BAAEAAjR Y+o2AUjIIBAQABNFr4jIJRMAoGBAAE0GjhMwpGwSgYEAAQQKOFzygYBaNgQABAAI0WPqNgFIyCAQEAATRa +IyCUTAKBgQABNBo4TMKRsEoGBAAEECjhc8oGAWjYEAAQACNFj6jYBSMggEBAAE0WviMglEwCgYEAATQaO EzCkbBKBgQABBAo4XPKBgFo2BAAEAAjRY+o2AUjIIBAQABNFr4jIJRMAoGBAAE0GjhMwpGwSgYEAAQQCyD 1F2MOOhRMApGAfHgPw56UACAABqMhQ+ooGGCtspgmHG0ABoFo4DkggeE/yLhf4OpAAIIoMFW+DBC3cQGxJ xAzAXE7FCx0QJoFIwC0gqeP0D8E4i/QfEvaCE0KAoggAAaTIUPrODhAGJ+IBaFYj5oAcQ8WviMglFAdOHz F1rwfADi10D8Cog/AfGPwdICAgigwVL4wLpaoBaPABDLArEyECtACyCuQdpFHAWjYLACUKvnKxC/BOK70M ob1v36NRgKH4AAGkyFDysQ8wCxBBCrArEeEKsAsRi08BmdmRsFo4C0wucLED+H9hx+QAujH1C5/wNdAAEE 0GAofNBbPTJArA7EGkCsBMSC0MBjGk1Po2AUEA1ALZzvDJCx0x9IXa8P0O7Y34F2IEAADZaWDzM0kISghY 88lBaBtoZgA86jYBSMAuLAP2iFDipkJKFYEJrPPkPz04C2fAACaLC0fGCFjyC02yUBLYi4oQE42uoZBaOA NADLM6AhC34o5hlM+QkggJgGUUCxQQMHFEh80MJotMUzCkYB+ZU6rGIH5S0OKD1o1s0BBBDTaCCNglEwrA sgJgbEol0Ye1DkKYAAYhoNpFEwCkZMK2hQ5SeAAGIaDaRRMApGwUAAgAAaHcgdBaNgFAwIAAig0cJnFIyC UTAgACCARgufUTAKRsGAAIAAGi18RsEoGAUDAgACaLTwGQWjYBQMCAAIoNHCZxSMglEwIAAggEYLn1EwCk bBgACAABotfEbBKBgFAwIAAmi08BkFo2AUDAgACKDRwmcUjIJRMCAAIIBGC59RMApGwYAAgAAaLXxGwSgY BQMCAAJotPAZBaNgFAwIAAig0cJnFIyCUTAgACCARguf UTAKRsGAAIAAGi18RsEoGAUDAgACaLTwGQWjYBQMCAAIoNHCZxSMglEwIAAggEYLn1EwCkbBgACA ABotfEbBKBgFAwIAAmi08BkFo2AUDAgACKDRwmcUjIJRMCAAIIBGC59RMApGwYAAgAAaLXxGwSgY BQMCAAJotPAZBaNgFAwIAAig0cJnFIyCUTAgACCARgufUTAKRsGAAIAAGi18RsEoGAUDAgACaLTw GQWjYBQMCAAIoNHCZxSMglEwIAAggEYLn1EwCkbBgACAABotfEbBKBgFAwIAAmi08BkFo2AUDAgA CKDRwmcUjIJRMCAAIIBGC59RMApGwYAAgAAaLXxGwSgYBQMCAAJotPAZBaNgFAwIAAig0cJnFIyC UTAgACCARgufUTAKRsGAAIAAGi18RsEoGAUDAgACaLTwGQWjYBQMCAAIoNHCZxSMglEwIAAggEYL n1EwCkbBgACAABotfEbBKBgFAwIAAmi08BkFo2AUDAgACKDRwmcUjIJRMCAAIIBGC59RMApGwYAA gAAaLXxGwSgYBQMCAAJosBU+/5HwKBgFo2AYA4AAGiyFD6iw+QfFf5HYo4XQKBgFw7RSBwggpkEU MKBC5xcQ/4DSf0dbQaNgFFClUv87GCt1gAAaLC2ff9AC5wsQfwTiT0D8HYj/jBY+o2AUkF3wwCp0 UF76BsQ/kfLUgOcrgABiGUSBBAqg90D8AopFgJgDiBmh7mQcTU+jYBSQlKdABc4HIH4NxR+hBdDf weBIgABiGSSBBSt83gHxEyB+CMQCQMwGlWMfRK20UTAKBjuA9SRABc8jIL4HzVNvoAXS38HQ8gEI oMHS8kEOLFDhwwctcEBNRDEg5gJi5tE0NQpGAdGV+TdoawdU8FyF0q+hlfygaPkABNBgafmACqDf DJAxH1CXixVaIIEKI1Fo4cMymqZGwSggCvxBKnweQgueJ9Bu1y+GQTLoDBBAg6nwQW79/IeW0C+R WkGgls/ouM8oGAWE8xKoZQMa2/kELYDeQAueQTWJAxBAgy0zwwaXQWM9nNAWDzsDYsB5tPAZBaOA cOHzH1rI/IS2gL5DK/ZBNXsMEECDMTOD3MQEbekwI7V4RgueUTAKSCuA/jKgrvEZVMtWAAJosGZo Rhz0KBgFo4D4AggbPWgAQACxDJGAGwWjYBQMMwAQQKPT16NgFIyCAQEAATRa+IyCUTAKBgQABNBo 4TMKRsEoGBAAEECjhc8oGAWjYEAAQACNFj6jYBSMggEBAAE0WviMglEwCgYEAATQaOEzCkbBKBgQ ABBAo4XPKBgFo2BAAEAAjRY+o2AUjIIBAQABNFr4jIJRMAoGBAAE0GjhMwpGwSgYEAAQQKOFzygY BaNgQABAAI0WPqNgFIyCAQEAATRa+IyCUTAKBgQABNBo4TMKRsEoGBAAEECjhc8oGAWjYEAAQACN Fj6jYBSMggEBAAE0WviMglEwCgYEAATQaOEzCkbBKBgQABBAo4XPKBgFo2BAAEAAjRY+o2AUjIIB AQABNFr4jIJRMAoGBAAE0GjhMwpGwSgYEAAQQKOFzygYBaNgQABAAI0WPqNgFIyCAQEAATRa+IyC UTAKBgQABNBo4TMKRsEoGBAAEECjhc8oGAWjYEAAQACNFj6jYBSMggEBAAE0WviMglEwCgYEAATQ aOEzCkbBKBgQABBgABhjzOGe1udtAAAAAElFTkSuQmCC" preserveAspectRatio="xMidYMid meet"/>
  722.         <path opacity="0.6" fill="#FFFFFF" d="M248.667,92.078c0,3.454-2.006,6.256-4.48,6.256H39.147c-2.475,0-4.48-2.802-4.48-6.256     V40.591c0-3.454,2.006-6.256,4.48-6.256h205.039c2.475,0,4.48,2.802,4.48,6.256V92.078z"/>
  723.         <path opacity="0.4" d="M55.959,34.376h-15.16c-3.454,0-6.256,2.034-6.256,4.545v54.827c0,2.511,2.802,4.545,6.256,4.545h15.16     V34.376z"/>
  724.         <linearGradient id="XMLID_2_" gradientUnits="userSpaceOnUse" x1="96.0059" y1="33.3936" x2="226.9258" y2="128.8988">
  725.                 <stop offset="0.0056" style="stop-color:#8C8C8C"/>
  726.                 <stop offset="0.1499" style="stop-color:#676767"/>
  727.                 <stop offset="0.3228" style="stop-color:#424242"/>
  728.                 <stop offset="0.4961" style="stop-color:#252525"/>
  729.                 <stop offset="0.6676" style="stop-color:#111111"/>
  730.                 <stop offset="0.8365" style="stop-color:#040404"/>
  731.                 <stop offset="1" style="stop-color:#000000"/>
  732.         </linearGradient>
  733.         <path opacity="0.29" fill="url(#XMLID_2_)" a:adobe-blending-mode="multiply" d="M243.104,34.833     c3.146,0.917,3.48,3.25,3.48,6.508v49.487c0,2.849-1.594,5.256-3.48,5.256H38.064c-0.865,0-1.702-0.502-2.354-1.414l-0.627,1.164     c1.039,1.451,1.453,2.25,2.981,2.25h205.039c3.688,0.041,5.48-3.255,5.48-7.256V41.341c0-4.001-2.459-7.256-5.48-7.256V34.833z"/>
  734.         <linearGradient id="XMLID_3_" gradientUnits="userSpaceOnUse" x1="-8.3408" y1="-40.8809" x2="251.3822" y2="145.2292">
  735.                 <stop offset="0.0056" style="stop-color:#FFFFFF"/>
  736.                 <stop offset="1" style="stop-color:#8C8C8C"/>
  737.         </linearGradient>
  738.         <path opacity="0.61" fill="url(#XMLID_3_)" a:adobe-blending-mode="overlay" d="M40.147,34.335c-3.021,0-5.48,3.255-5.48,7.256     v51.487c0,1.878,0.532,2.656,1.499,4.006l1.627-0.164c-0.727-1.014-1.126-2.378-1.126-3.842V41.591     c0-2.849,1.594-5.256,3.48-5.256c0,0,200.354,0,203.187,0c4.166,0,4.583,3.915,5.083,5.332c0.235,0.668,0.333-7.332-5.23-7.332     C240.25,34.335,40.147,34.335,40.147,34.335z"/>
  739.         <path fill="none" stroke="#232323" d="M248.667,92.078c0,3.454-2.006,6.256-4.48,6.256H39.147c-2.475,0-4.48-2.802-4.48-6.256     V40.591c0-3.454,2.006-6.256,4.48-6.256h205.039c2.475,0,4.48,2.802,4.48,6.256V92.078z"/>
  740.         <g id="Progress_Group">
  741.             <path id="ProgressBkgd_2_" opacity="0.6" fill="#FFFFFF" stroke="#000000" d="M239.667,88.75h-174.5V81.5h174.5V88.75z"/>
  742.             <line id="Progress_Bar" stroke="#7F9FFF" fill="none" stroke-width="1" transform="matrix(17.45 0 0 3.25 65.667 85.125)" x1="0" x2="0" y1="0" y2="0" pointer-events="none"/>
  743.         </g>
  744.         <g id="Button_Quit">
  745.             <radialGradient id="XMLID_4_" cx="223.2773" cy="49.4365" r="25.3111" fx="223.2773" fy="49.4365" gradientUnits="userSpaceOnUse">
  746.                 <stop offset="0.0056" style="stop-color:#FFFFFF"/>
  747.                 <stop offset="0.0383" style="stop-color:#F8EBEA"/>
  748.                 <stop offset="0.1628" style="stop-color:#E0A49E"/>
  749.                 <stop offset="0.2739" style="stop-color:#CD6B61"/>
  750.                 <stop offset="0.3676" style="stop-color:#BF4236"/>
  751.                 <stop offset="0.4403" style="stop-color:#B6291B"/>
  752.                 <stop offset="0.4831" style="stop-color:#B32011"/>
  753.                 <stop offset="0.9382" style="stop-color:#910F05"/>
  754.             </radialGradient>
  755.             <path opacity="0.7" fill="url(#XMLID_4_)" stroke="#000000" d="M239.666,58.313c0,5.431-4.403,9.834-9.834,9.834     s-9.833-4.403-9.833-9.834c0-5.43,4.402-9.833,9.833-9.833S239.666,52.884,239.666,58.313z"/>
  756.             <g opacity="0.8" pointer-events="none">
  757.                 <path fill="none" stroke="#FFFFFF" stroke-width="3" d="M224.892,63.028l4.838-4.839"/>
  758.                 <path fill="none" stroke="#FFFFFF" stroke-width="3" d="M234.57,53.352l-4.841,4.838"/>
  759.                 <path fill="none" stroke="#FFFFFF" stroke-width="3" d="M229.729,58.189l-4.838-4.838"/>
  760.                 <path fill="none" stroke="#FFFFFF" stroke-width="3" d="M229.729,58.189l4.841,4.839"/>
  761.             </g>
  762.         </g>
  763.         <g id="Button_First">
  764.             <radialGradient id="XMLID_8_" cx="68.0273" cy="49.4365" r="25.3111" fx="68.0273" fy="49.4365" gradientUnits="userSpaceOnUse">
  765.                 <stop offset="0.0056" style="stop-color:#FFFFFF"/>
  766.                 <stop offset="0.1137" style="stop-color:#D9D9D9"/>
  767.                 <stop offset="0.3443" style="stop-color:#8D8D8D"/>
  768.                 <stop offset="0.5502" style="stop-color:#505050"/>
  769.                 <stop offset="0.724" style="stop-color:#252525"/>
  770.                 <stop offset="0.8588" style="stop-color:#0A0A0A"/>
  771.                 <stop offset="0.9382" style="stop-color:#000000"/>
  772.             </radialGradient>
  773.             <path opacity="0.7" fill="url(#XMLID_8_)" stroke="#000000" d="M84.416,58.313c0,5.431-4.403,9.834-9.834,9.834     s-9.833-4.403-9.833-9.834c0-5.43,4.402-9.833,9.833-9.833S84.416,52.884,84.416,58.313z"/>
  774.             <path opacity="0.8" fill="#FFFFFF" d="M72.186,58.389l3.061-2.582l3.06-2.584v5.166v5.167l-3.06-2.584L72.186,58.389z"/>
  775.             <path opacity="0.8" fill="none" stroke="#FFFFFF" d="M71.167,53.389v10"/>
  776.         </g>
  777.         <g id="Button_Prev">
  778.             <radialGradient id="XMLID_5_" cx="97.4023" cy="49.4365" r="25.3111" fx="97.4023" fy="49.4365" gradientUnits="userSpaceOnUse">
  779.                 <stop offset="0.0056" style="stop-color:#FFFFFF"/>
  780.                 <stop offset="0.1137" style="stop-color:#D9D9D9"/>
  781.                 <stop offset="0.3443" style="stop-color:#8D8D8D"/>
  782.                 <stop offset="0.5502" style="stop-color:#505050"/>
  783.                 <stop offset="0.724" style="stop-color:#252525"/>
  784.                 <stop offset="0.8588" style="stop-color:#0A0A0A"/>
  785.                 <stop offset="0.9382" style="stop-color:#000000"/>
  786.             </radialGradient>
  787.             <path opacity="0.7" fill="url(#XMLID_5_)" stroke="#000000" d="M113.791,58.313c0,5.431-4.403,9.834-9.834,9.834     s-9.833-4.403-9.833-9.834c0-5.43,4.402-9.833,9.833-9.833S113.791,52.884,113.791,58.313z"/>
  788.             <path opacity="0.8" fill="#FFFFFF" d="M99.436,58.389l3.061-2.582l3.06-2.584v5.166v5.167l-3.06-2.584L99.436,58.389z"/>
  789.         </g>
  790.         <g id="Button_Play" display="none">
  791.             <radialGradient id="XMLID_6_" cx="127.6104" cy="45.1484" r="37.5378" fx="127.6104" fy="45.1484" gradientUnits="userSpaceOnUse">
  792.                 <stop offset="0.0056" style="stop-color:#FFFFFF"/>
  793.                 <stop offset="0.1048" style="stop-color:#CEDABE"/>
  794.                 <stop offset="0.206" style="stop-color:#A1B982"/>
  795.                 <stop offset="0.2923" style="stop-color:#80A157"/>
  796.                 <stop offset="0.3594" style="stop-color:#6C923C"/>
  797.                 <stop offset="0.3989" style="stop-color:#648C32"/>
  798.                 <stop offset="0.9382" style="stop-color:#1F471A"/>
  799.             </radialGradient>
  800.             <path display="inline" opacity="0.7" fill="url(#XMLID_6_)" stroke="#000000" d="M151.916,58.313     c0,8.053-6.531,14.584-14.584,14.584c-8.055,0-14.583-6.531-14.583-14.584c0-8.052,6.528-14.583,14.583-14.583     C145.385,43.73,151.916,50.262,151.916,58.313z"/>
  801.             <path display="inline" opacity="0.8" fill="#FFFFFF" d="M144.352,58.014l-5.207-4.395l-5.208-4.396v8.791v8.792l5.208-4.396     L144.352,58.014z"/>
  802.         </g>
  803.         <g id="Button_Pause">
  804.             <radialGradient id="XMLID_7_" cx="127.6104" cy="45.1484" r="37.5378" fx="127.6104" fy="45.1484" gradientUnits="userSpaceOnUse">
  805.                 <stop offset="0.0056" style="stop-color:#FFFFFF"/>
  806.                 <stop offset="0.0338" style="stop-color:#FAF2E9"/>
  807.                 <stop offset="0.1359" style="stop-color:#EAC59D"/>
  808.                 <stop offset="0.2271" style="stop-color:#DDA260"/>
  809.                 <stop offset="0.304" style="stop-color:#D48835"/>
  810.                 <stop offset="0.3637" style="stop-color:#CE791A"/>
  811.                 <stop offset="0.3989" style="stop-color:#CC7310"/>
  812.                 <stop offset="0.8258" style="stop-color:#872D00"/>
  813.             </radialGradient>
  814.             <path opacity="0.7" fill="url(#XMLID_7_)" stroke="#000000" d="M151.916,58.313c0,8.053-6.531,14.584-14.584,14.584     c-8.055,0-14.583-6.531-14.583-14.584c0-8.052,6.528-14.583,14.583-14.583C145.385,43.73,151.916,50.262,151.916,58.313z"/>
  815.             <path opacity="0.8" fill="none" stroke="#FFFFFF" stroke-width="3" d="M134,49.5V67"/>
  816.             <path opacity="0.8" fill="none" stroke="#FFFFFF" stroke-width="3" d="M140.5,49.5V67"/>
  817.         </g>
  818.         <g id="Button_Next">
  819.             <radialGradient id="XMLID_9_" cx="164.1523" cy="49.4365" r="25.3111" fx="164.1523" fy="49.4365" gradientUnits="userSpaceOnUse">
  820.                 <stop offset="0.0056" style="stop-color:#FFFFFF"/>
  821.                 <stop offset="0.1137" style="stop-color:#D9D9D9"/>
  822.                 <stop offset="0.3443" style="stop-color:#8D8D8D"/>
  823.                 <stop offset="0.5502" style="stop-color:#505050"/>
  824.                 <stop offset="0.724" style="stop-color:#252525"/>
  825.                 <stop offset="0.8588" style="stop-color:#0A0A0A"/>
  826.                 <stop offset="0.9382" style="stop-color:#000000"/>
  827.             </radialGradient>
  828.             <path opacity="0.7" fill="url(#XMLID_9_)" stroke="#000000" d="M180.541,58.313c0,5.431-4.403,9.834-9.834,9.834     s-9.833-4.403-9.833-9.834c0-5.43,4.402-9.833,9.833-9.833S180.541,52.884,180.541,58.313z"/>
  829.             <path opacity="0.8" fill="#FFFFFF" d="M175.037,58.389l-3.061-2.582l-3.06-2.584v5.166v5.167l3.06-2.584L175.037,58.389z"/>
  830.         </g>
  831.         <g id="Button_Last">
  832.             <radialGradient id="XMLID_10_" cx="193.5273" cy="49.4365" r="25.3111" fx="193.5273" fy="49.4365" gradientUnits="userSpaceOnUse">
  833.                 <stop offset="0.0056" style="stop-color:#FFFFFF"/>
  834.                 <stop offset="0.1137" style="stop-color:#D9D9D9"/>
  835.                 <stop offset="0.3443" style="stop-color:#8D8D8D"/>
  836.                 <stop offset="0.5502" style="stop-color:#505050"/>
  837.                 <stop offset="0.724" style="stop-color:#252525"/>
  838.                 <stop offset="0.8588" style="stop-color:#0A0A0A"/>
  839.                 <stop offset="0.9382" style="stop-color:#000000"/>
  840.             </radialGradient>
  841.             <path opacity="0.7" fill="url(#XMLID_10_)" stroke="#000000" d="M209.916,58.313c0,5.431-4.403,9.834-9.834,9.834      s-9.833-4.403-9.833-9.834c0-5.43,4.402-9.833,9.833-9.833S209.916,52.884,209.916,58.313z"/>
  842.             <path opacity="0.8" fill="#FFFFFF" d="M202.287,58.389l-3.061-2.582l-3.06-2.584v5.166v5.167l3.06-2.584L202.287,58.389z"/>
  843.             <path opacity="0.8" fill="none" stroke="#FFFFFF" d="M203.306,53.389v10"/>
  844.         </g>
  845.         <g id="Button_Close">
  846.             <path opacity="0.8" fill="none" stroke="#FFFFFF" pointer-events="all" d="M52.896,53.188H40.063V40.354h12.833V53.188z"/>
  847.             <g opacity="0.8" pointer-events="none">
  848.                 <path fill="none" stroke="#FFFFFF" stroke-width="2" d="M42.623,50.628l3.856-3.857"/>
  849.                 <path fill="none" stroke="#FFFFFF" stroke-width="2" d="M50.338,42.915l-3.858,3.855"/>
  850.                 <path fill="none" stroke="#FFFFFF" stroke-width="2" d="M46.479,46.771l-3.856-3.855"/>
  851.                 <path fill="none" stroke="#FFFFFF" stroke-width="2" d="M46.479,46.771l3.858,3.857"/>
  852.             </g>
  853.         </g>
  854.     </g>
  855. </svg><!-- 
  856.  Copyright 2002, Adobe Systems Incorporated 
  857.  All Rights Reserved.
  858.  
  859.  NOTICE: All information contained herein is, and remains the property 
  860.  of Adobe Systems Incorporated and its suppliers, if any.  The 
  861.  intellectual and technical concepts contained herein are proprietary 
  862.  to Adobe Systems Incorporated and its suppliers and may be covered by 
  863.  U.S. and Foreign Patents, patents in process, and are protected by
  864.  trade secret or copyright law.  Dissemination of this information or 
  865.  reproduction of this material is strictly forbidden unless prior
  866.  written permission is obtained from Adobe Systems Incorporated.
  867. --><svg width="100%" height="100%" viewBox="0 0 707 516" onload="onLoadVideoScaler()" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/4.0/" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" zoomAndPan="magnify">
  868.     <script id="VideoScaleScript" language="JavaScript1.2"><![CDATA[
  869.  
  870.         //-----------------------------------------------------------------------------
  871.         function onLoadVideoScaler()
  872.         {
  873.             document.rootElement.addEventListener( "SVGResize", onResize, false )
  874.  
  875.             // Adjust the sizes of all video elements so that they display at their natural size.
  876.  
  877.             adjustVideoSizes(true);
  878.         }
  879.  
  880.         //-----------------------------------------------------------------------------
  881.         // Adjust the sizes of all video elements so that they display at their natural size.
  882.         //
  883.         function adjustVideoSizes(bFirstTime)
  884.         {
  885.             var videoList = document.getElementsByTagName('a:video');
  886.             var uVideoCount = videoList.getLength();
  887.             var uSpaceWidth;
  888.             var uSpaceHeight;
  889.             var uSpaceX;
  890.             var uSpaceY;
  891.             var i;
  892.             for(i = 0; i < uVideoCount; i++)
  893.             {
  894.                 var video = videoList.item(i);
  895.                 uDimensionX = video.getAttribute('pixelWidth');
  896.                 uDimensionY = video.getAttribute('pixelHeight');
  897.                 if((uDimensionX > 0) && (uDimensionY > 0))
  898.                 {
  899.                     // Determine what area is allocated for the video. Save it into spaceWidth/Height since
  900.                     // the width/height attributes will be replaced.
  901.  
  902.                     if(bFirstTime)
  903.                     {
  904.                         uSpaceX = video.getAttribute('x');
  905.                         uSpaceY = video.getAttribute('y');
  906.                         uSpaceWidth = video.getAttribute('width');
  907.                         uSpaceHeight = video.getAttribute('height');
  908.                         video.setAttribute('spaceX', uSpaceX);
  909.                         video.setAttribute('spaceY', uSpaceY);
  910.                         video.setAttribute('spaceWidth', uSpaceWidth);
  911.                         video.setAttribute('spaceHeight', uSpaceHeight);
  912.                     }
  913.                     else
  914.                     {
  915.                         uSpaceX = video.getAttribute('spaceX');
  916.                         uSpaceY = video.getAttribute('spaceY');
  917.                         uSpaceWidth = video.getAttribute('spaceWidth');
  918.                         uSpaceHeight = video.getAttribute('spaceHeight');
  919.                     }
  920.  
  921.                     // Use the inverse of the CTM to determine the user space dimensions of the video that
  922.                     // will let the video be drawn with the desired pixel dimensions
  923.  
  924.                     var matrix = video.getScreenCTM().inverse();
  925.                     uDimensionX *= matrix.a;
  926.                     uDimensionY *= matrix.d;
  927.  
  928.                     // If the desired pixel dimensions are larger than the allocated space, scale the video
  929.                     // image down to fit.
  930.  
  931.                     if((uDimensionX > uSpaceWidth) || (uDimensionY > uSpaceHeight))
  932.                     {
  933.                         var fFractionFilledX = uDimensionX / uSpaceWidth;
  934.                         var fFractionFilledY = uDimensionY / uSpaceHeight;
  935.  
  936.                         if(fFractionFilledX < fFractionFilledY)
  937.                             fFractionFilledX = fFractionFilledY;
  938.                         if(fFractionFilledX > 1.0)
  939.                         {
  940.                             uDimensionX /= fFractionFilledX;
  941.                             uDimensionY /= fFractionFilledX;
  942.                         }
  943.                     }
  944.  
  945.                     video.setAttribute('width', uDimensionX);
  946.                     video.setAttribute('height', uDimensionY);
  947.  
  948.                     // Adjust the x and y attributes to center the video image.
  949.  
  950.                     var x = 1*uSpaceX + (uSpaceWidth - uDimensionX) / 2.0;
  951.                     var y = 1*uSpaceY + (uSpaceHeight - uDimensionY) / 2.0;
  952.                     video.setAttribute('x', x);
  953.                     video.setAttribute('y', y);
  954.                     video.setAttribute('preserveAspectRatio', 'none');
  955.                 }
  956.             }
  957.         }
  958.  
  959.         //-----------------------------------------------------------------------------
  960.         function onResize()
  961.         {
  962.             adjustVideoSizes(false);
  963.         }
  964.  
  965.         //-----------------------------------------------------------------------------
  966.     ]]></script>
  967.  
  968. </svg>
  969. </svg>